//
//  MyClientCell.m
//  Marketing
//
//  Created by HanenDev on 16/3/1.
//  Copyright © 2016年 Hanen 3G 01. All rights reserved.
//

#import "MyClientCell.h"

#define STARTX [UIView getWidth:10]
#define CELLHEIGHT 70.0f

@implementation MyClientCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        CGFloat cellY = 15.0f;
        //公司名称
        _companyLabel = [[UILabel alloc]initWithFrame:CGRectMake(STARTX, cellY, [UIView getWidth:200], 20)];
        _companyLabel.textColor = blackFontColor;
        [ViewTool setLableFont14:_companyLabel];
        [ViewTool setLableFont14:_companyLabel];
        [self.contentView addSubview:_companyLabel];
        
//        //定位
//        _locationBtn = [[UIButton alloc]initWithFrame:CGRectMake(STARTX, _companyLabel.maxY, 20, 20)];
//        _locationBtn.backgroundColor = [UIColor redColor];
//        [_locationBtn setImage:[UIImage imageNamed:@"HY_list_icon_coordinate"] forState:UIControlStateNormal];
//        [self.contentView addSubview:_locationBtn];
        
        UIImageView *imageV = [[UIImageView alloc]initWithFrame:CGRectMake(STARTX, _companyLabel.maxY, 20, 20)];
        imageV.image = [UIImage imageNamed:@"HY_list_icon_coordinate"];
        [self.contentView addSubview:imageV];
        
        _addressLabel = [[UILabel alloc]initWithFrame:CGRectMake(imageV.maxX, _companyLabel.maxY, KSCreenW - [UIView getWidth:80]- 20 - 2*STARTX, 20)];
        _addressLabel.textColor = grayFontColor;
        [ViewTool setLableFont12:_addressLabel];
        [self.contentView addSubview:_addressLabel];
        
        
        _statusLabel = [[UILabel alloc]initWithFrame:CGRectMake(KSCreenW -STARTX - [UIView getWidth:80], ([MyClientCell cellHeight] -20)/2, [UIView getWidth:80], 20)];
        _statusLabel.textAlignment = NSTextAlignmentRight;
        _statusLabel.textColor = UIColorFromRGB(0x00c6ae);
        [ViewTool setLableFont12:_statusLabel];
        [self.contentView addSubview:_statusLabel];
        
        _lineView = [[UIView alloc]init];
        _lineView.backgroundColor = grayLineColor;
        [self.contentView addSubview:_lineView];
        
    }
    return self;
}
+ (CGFloat)cellHeight
{
    return 70.0f;
}
- (void)clickToJimpMap:(UIButton *)btn
{
    NSLog(@"fsdfsd");
    if ([self.delegate respondsToSelector:@selector(jumpControllerToMap:)]) {
        NSLog(@"fssd");
        [self.delegate jumpControllerToMap:btn.currentTitle];
    }
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
